package com.wang.lotterysystem.controller.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * 活动奖品状态
 */
@AllArgsConstructor
@Getter
public enum ActivityPrizeStatusEnum {
    INIT(1,"初始化"),
    COMPLETED(2,"已被抽取");
    private Integer code;
    private String message;
    public static ActivityPrizeStatusEnum checkForName(String name){
        for (ActivityPrizeStatusEnum activityPrizeStatusEnum : ActivityPrizeStatusEnum.values()) {
            if (activityPrizeStatusEnum.name().equalsIgnoreCase(name)){
                return activityPrizeStatusEnum;
            }
        }
        return null;
    }
}
